﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microhard.Core.DBUtility;
using System.ComponentModel.DataAnnotations;
using Microhard.WarehouseInsp.Buz.BuzEnum;
using Microhard.Core.Extensions;
using Microhard.WarehouseInsp.Buz.Validator;

namespace Microhard.WarehouseInsp.Buz.Models
{
    [FluentValidation.Attributes.Validator(typeof(OutIntPutWarehouseValidator))]
    public class OutIntPutWarehouseModel : BasePermissionModel
    {
        //数据库字段全加上
        public OutIntPutWarehouseModel()
        {

        }

        //主键要加上这个属性
        [ModelPKID]
        public Guid OutInPutWarehouseID { get; set; }

        public Guid PlnPdgID { get; set; }

        public string ProductName { get; set; }

        public double OutInCount { get; set; }

        public DateTime CreateTime { get; set; }

        public DateTime PlayExTime { get; set; }

        public string ApplyID { get; set; }

        public string ApplyName { get; set; }

        public int Status { get; set; }

        //出库状态
        public string OutStatus
        {

            get
            {
                Enum oip = (PrjStatus)Enum.Parse(typeof(PrjStatus), this.Status.ToString());
                return oip.GetDisplayText();
            }
        }

        public int OutInPutType { get; set; }

        public string OIPutType
        {
            get
            {
                Enum oip = (OutInPutType)Enum.Parse(typeof(OutInPutType), OutInPutType.ToString());
                return oip.GetDisplayText();
            }
        }
        public decimal OutInAmount { get; set; }

        public decimal OutInPrice { get; set; }

        public DateTime? ApplyTime { get; set; }

        public DateTime? ApproveTime { get; set; }

        public PledgePlanInRecordsModel PPInRecord { get; set; }

        public SupProjectModel Project { get; set; }

        public Guid ProjectID { get; set; }
        public string ProjectName { set; get; }

        public string WarehouseName { get; set; }

        public Guid OutInPutApplyID { get; set; }

        [UIHint("ProductSelect")]
        public string ProductIDForSelect { set; get; }

        [UIHint("ApplyProductSelect")]
        public string InProductIDForSelect { set; get; }


        public Guid OutInPutWarehouseIDForSelect { set; get; }

        public string WarehouseMngName { set; get; }

    }
}
